Skip to content

fix(cli): doctor check uses v2 task schedule instead of removed v1 user_memories key#219

Merged
ualtinok merged 1 commit into
cortexkit:masterfrom
tobwen:fix/doctor-stale-user-memories-check
Jul 8, 2026
Merged

fix(cli): doctor check uses v2 task schedule instead of removed v1 user_memories key#219
ualtinok merged 1 commit into
cortexkit:masterfrom
tobwen:fix/doctor-stale-user-memories-check

Conversation

@tobwen

@tobwen tobwen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #220.

Problem

The doctor check (section 7) read dreamer.user_memories.enabled, a v1 config key
that was migrated to dreamer.tasks["review-user-memories"].schedule in v2. After
migrateDreamerV2ForDoctor runs and writes back, the key is gone from the file. The
default-true logic (undefined !== false) always fired the warning when
dreamer.disable=true, and the message told users to set a non-existent setting.

Fix

  • Extracted check into checkUserMemoriesDreamerCompatibility()
  • Reads dreamer.tasks["review-user-memories"].schedule (matches runtime gate in task-config.ts)
  • Updated warning message to reference v2 setting
  • Added 8 unit tests

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Fixes the doctor CLI check to use the v2 task schedule instead of the removed v1 user_memories key, preventing false warnings when dreamer.disable=true. The warning now points to the correct v2 setting and matches runtime gating.

  • Bug Fixes
    • Read dreamer.tasks["review-user-memories"].schedule and ignore legacy dreamer.user_memories.
    • Updated warning to reference v2 config and explain the no-op combo with dreamer.disable=true.
    • Extracted checkUserMemoriesDreamerCompatibility() and added 8 unit tests.

Written for commit 7c0c3ee. Summary will update on new commits.

Review in cubic

Greptile Summary

This PR updates the OpenCode doctor check for the v2 dreamer task config.

  • Adds a helper for review-user-memories and dreamer.disable compatibility.
  • Reads dreamer.tasks["review-user-memories"].schedule instead of the old v1 key.
  • Updates the warning message to point at the v2 setting.
  • Adds unit tests for scheduled, disabled, empty, absent, and legacy-key cases.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The new check matches the v2 runtime behavior for empty or missing task schedules.
  • The added export is additive and the test file already imports this module.

Important Files Changed

Filename Overview
packages/cli/src/commands/doctor-opencode.ts Adds the v2 schedule-based compatibility helper and uses it from the doctor warning path.
packages/cli/src/commands/doctor-opencode.test.ts Adds focused coverage for the new compatibility helper and the legacy key behavior.

Reviews (1): Last reviewed commit: "fix(cli): doctor check uses v2 task sche..." | Re-trigger Greptile

…er_memories key

The section-7 check read `dreamer.user_memories.enabled`, a v1 key migrated
to `dreamer.tasks["review-user-memories"].schedule` in v2. The default-true
logic always fired when `dreamer.disable=true`, and the warning referenced a
non-existent setting. Now matches the runtime gate in task-config.ts.
Copilot AI review requested due to automatic review settings July 7, 2026 23:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OpenCode CLI doctor compatibility check for user-memories + dreamer so it aligns with Dreamer v2 configuration, avoiding false warnings and pointing users to the correct setting.

Changes:

  • Extracted the compatibility logic into checkUserMemoriesDreamerCompatibility() for reuse and unit testing.
  • Switched the check from legacy dreamer.user_memories.enabled (v1) to v2 task gating via dreamer.tasks["review-user-memories"].schedule.
  • Updated the warning text and added targeted unit tests for the new helper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/cli/src/commands/doctor-opencode.ts Replaces the legacy v1 user-memories config check with a v2 task-schedule-based compatibility check and updated warning message.
packages/cli/src/commands/doctor-opencode.test.ts Adds unit tests validating the new compatibility helper across enabled/disabled and missing/empty schedule scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@ualtinok ualtinok merged commit b374a36 into cortexkit:master Jul 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor complains about dreamer.user_memories.enabled

3 participants